package com.moneywelcome.userserviceassembly.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel("完善账号个人信息的参数")
public class UpdateUserParam {

    @NotBlank
    @ApiModelProperty("登录ID")
    private Integer userLoginId;

    @NotBlank
    @ApiModelProperty("昵称")
    private String nickname;

    @NotBlank
    @ApiModelProperty("头像")
    private String avatar;

    @NotBlank
    @ApiModelProperty("实名认证状态")
    private String authStatus;

    @NotBlank
    @Pattern(message = "身份证号码格式不正确",regexp = "^[1-9]\\d{5}(18|19|20|(3\\d))\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$")
    @ApiModelProperty("身份证号码")
    private String idCard;

    @NotBlank
    @Pattern(message = "您输入的邮箱格式不正确",regexp = "^\\s*\\w+(?:\\.{0,1}[\\w-]+)@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)\\.[a-zA-Z]+\\s*$")
    @ApiModelProperty("邮箱")
    private String email;

    @NotBlank
    @ApiModelProperty("现居住址")
    private String currentAddress;

    @NotBlank
    @Pattern(message = "您输入的银行卡号格式不正确",regexp = "[1-9]\\d{12,18}")
    @ApiModelProperty("银行卡号")
    private String bankAccount;

    @NotBlank
    @ApiModelProperty("紧急联系人")
    private String emergencyContact;

    @NotBlank
    @Pattern(message = "您输入的电话号码格式不正确",regexp = "^1[3|4|5|7|8][0-9]{9}$")
    @ApiModelProperty("紧急联系电话")
    private String emergencyPhone;
}
